class ParamsTypeError(Exception):
    pass

def fib_sequence1():
    lis =[]
    for i in range(0,20):
        if i ==0 or i ==1:#第1,2项 都为1
            lis.append(1)
        else:
            lis.append(lis[i-2]+lis[i-1])#从第3项开始每项值为前两项值之和
    print(lis)

def fib_sequence2():
    lis =[]
    i = 0
    while(i < 20):
        if i ==0 or i ==1:#第1,2项 都为1
            lis.append(1)
        else:
            lis.append(lis[i-2]+lis[i-1])#从第3项开始每项值为前两项值之和
        i+=1
    print(lis)

def my_cal(x, y):
    try:
        return int(x) + int(y)
    except:
            raise ParamsTypeError('参数类型错误')


if __name__=="__main__":
    fib_sequence1()
    fib_sequence2()
    print(my_cal('z', 1))
